﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace MassivColor
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("сортировка массива чисел");
            Int32[] mas = { 10, 5, 0, -8, 2, 1 };
            foreach (Int32 i in mas)
            {
                Console.Write(" {0}", i);
            }
            Console.WriteLine();
            Int32 temp;
            for (Int32 i = 0; i < mas.Length / 2; i++)
            {
                temp = mas[i];
                mas[i] = mas[mas.Length - i - 1];
                mas[mas.Length - i - 1] = temp;
            }
            foreach (Int32 i in mas)
            {
                Console.Write(" {0}", i);
            }
            Console.ReadLine();

            Console.WriteLine("сортировка массива перечислений");
            Color[] cl = (Color[])Enum.GetValues(typeof(Color));
            foreach (var i in cl)
            {
                Console.Write(" {0}", i);
            }
            Console.WriteLine();

            Color temp_c;
            for (Int32 i = 0; i < cl.Length/2; i++)
            {
                temp_c = cl[cl.Length - i - 1];
                cl[cl.Length - i - 1] = cl[i];
                cl[i] = temp_c;
            }
            foreach (var i in cl)
            {
                Console.Write(" {0}", i);
            }
                Console.ReadLine();
        }
    }

    public enum Color { Red, Blue, Green, Orange, White};

}
